<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/pages/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="Generator" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>鹰牌陶瓷合肥运营中心</title>
<meta name="keywords" content="鹰牌陶瓷,陶瓷,鹰牌,安徽,合肥" />
<meta name="description" content="鹰牌陶瓷合肥运营中心,产品展示,产品分类,推荐产品" />
<meta name="author" content="" />
<link href="${ctx}/css/sub/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="${ctx}/themes/default/default.css" type="text/css" />
<link rel="stylesheet" href="${ctx}/css/main.css" type="text/css" />
<script type="text/javascript" src="commons/scripts/jquery.js"></script>
<!-- IE6 fixes are found in styles/ie6.css -->
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="${ctx}/css/ie6.main.css" /><![endif]-->
</head>
<body style="background: none repeat scroll 0 0 #FFFFFF;">
<div id="main" style="width: 790px;">
  <div id="bd" style="width: 790px;">
    <div id="bd_left2" style="width: 211px;">
      	<div id="sortlist" class="m">
			<div class="mt">
				<h2>全部产品分类</h2>
			</div>
			<div class="mc">
				<c:forEach var="firstProductType" items="${typeList}">
					<div class="item current"><!-- 一级  -->
						<h3>
							<b></b><a title="${firstProductType.dictionary_desc_cn}" href="${ctx}/ProductDisplay.do?method=orderSelect&mod_id=3200&type1_id=${firstProductType.dictionary_value}&type1_name=${firstProductType.dictionary_desc_cn}" target="_self" t_id="${firstProductType.dictionary_value}" par_id="0">${firstProductType.dictionary_desc_cn}</a>
						</h3>
						<ul><!-- 二级 -->
							<c:forEach var="secondProductType" items="${firstProductType.sysDictionaryList}">
								<li><a title="${secondProductType.dictionary_desc_cn}" href="${ctx}/ProductDisplay.do?method=orderSelect&mod_id=3200&type1_id=${firstProductType.dictionary_value}&type2_id=${secondProductType.dictionary_value}&type2_name=${secondProductType.dictionary_desc_cn}&type1_name=${firstProductType.dictionary_desc_cn}" target="_self" t_id="${secondProductType.id}" par_id="${firstProductType.dictionary_value}">${secondProductType.dictionary_desc_cn}</a></li>
							</c:forEach>
						</ul>
					</div>
				</c:forEach>
			</div>
		</div>
    </div>
    <div id="bd_right2" class="news" style="width: 570px; ">
        <div class="mt">
		   <h2>产品展示</h2>
		   <div class="extra">${title}</div>
	  	</div>
        <div class="product_ul_list" style="margin-left: 4px;">
			<ul>
				<c:forEach var="cur" items="${entityList}" varStatus="vs">
					 <c:set value="${fn:length(cur.product_name)}" var="len1" />
					 <c:set value="${fn:length(cur.product_model)}" var="len2" />
					 <li style="height: 230px; margin-bottom: 0px;">
	                    <div class="picimg"><a title="${cur.product_name}" ><img src="${ctx}/${cur.accessory.save_url}"></a></div>
	                    <div class="producttext">
                 		 	<div class="zs_opacity">
                 		 		<p>品名：
                		 		  <c:choose>
			                  	    <c:when test="${len1 gt 11}"><span title="${cur.product_name}">${fn:substring(cur.product_name,0,11)}</span></c:when>
			                  	    <c:when test="${len1 le 11}"><span title="${cur.product_name}">${cur.product_name}</span></c:when>
			                	  </c:choose>
                 		 		</p>
                 		 		<p>型号：
                 		 		  <c:choose>
		                        	<c:when test="${len2 gt 11}"><span title="${cur.product_model}">${fn:substring(cur.product_model,0,11)}</span></c:when>
				                	<c:when test="${len2 le 11}"><span title="${cur.product_model}">${cur.product_model}</span></c:when>
		                      	  </c:choose>
                 		 		</p>
                 		 	</div>
	                    	<div id="choose">
	                    		<dl class="price" style="border-bottom: 0;">
	                    			<dt>　<span class="price_m">原价:<span style="color: #B94708">￥${cur.sale_price}</span></span> 现价:<span style="color: #B94708;font-size: 14px;">￥<b>${cur.promotion_price}</b></span></dt>
	                    		</dl>
	                    		<dl class="amount" style="border-bottom: 0;">
	                    			<dt class="order_submit" product_id="${cur.product_id}" 
	                    					product_name="${cur.product_name}" 
	                    					product_model="${cur.product_model}"
	                    					promotion_price="${cur.promotion_price}"
	                    					sale_price="${cur.sale_price}"
	                    					save_url="${cur.accessory.save_url}"
	                    					>　
	                    			<img  style="width: 73px;height: 26px;"
	                    					alt="" src="${ctx}/css/images/olorder_btn.png" 
	                    					class="btn-append">
	                    			</dt>
	                    			<dd>
	                    				<a class="reduce" href="javascript:void(0);">-</a>
	                    				<input value="1" id="pamount" type="text">
	                    				<a class="add" href="javascript:void(0);">+</a></dd>
	                    		</dl>
	                    	</div>
			                <c:if test="${cur.is_new==1}">
			                	<div class="product_news"></div>
		                    	</div>
			                </c:if>
                    </li>
				</c:forEach>
			</ul>
			<div style="clear: both;"></div>
			<form id="bottomPageForm" name="bottomPageForm" method="post" action="ProductDisplay.do">
		      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
		        <tr>
		          <td height="40" align="center"><script type="text/javascript" src="${ctx}/commons/scripts/pager.js">;</script>
		            <script type="text/javascript">
		            var pager = new Pager(document.bottomPageForm, ${hf.map.pager.recordCount}, ${hf.map.pager.pageSize}, ${hf.map.pager.currentPage});
		            pager.addHiddenInputs("method", "orderSelect");
		            pager.addHiddenInputs("mod_id", "${hf.map.mod_id}");
		            pager.addHiddenInputs("type1_id", "${hf.map.type1_id}");
		            pager.addHiddenInputs("type2_id", "${hf.map.type2_id}");
		            pager.addHiddenInputs("is_recommend", "${hf.map.is_recommend}");
		            pager.addHiddenInputs("type1_name", "${hf.map.type1_name}");
		            pager.addHiddenInputs("type2_name", "${hf.map.type2_name}");
		            document.write(pager.toString());
		            </script>
		          </td>
		        </tr>
		      </table>
		    </form>
		</div>
    </div>
  </div>
</div>
 <script type="text/javascript">
	$('.sub li a').bind("click",function(){
		$('.sub_ul').each(function(){
			$(this).css("display","none");
		});
		if($("#ul_"+$(this).attr("t_id")).attr("open")=="false"){
			$("#ul_"+$(this).attr("t_id")).css("display","block");
			$("#ul_"+$(this).attr("t_id")).attr("open","true");
		}else $("#ul_"+$(this).attr("t_id")).attr("open","false");
		
	});
	
	$('.reduce').bind("click",function(){
		if($(this).next().val()-1>0){
			$(this).next().val($(this).next().val()-1);
		}
	});
	
	$('.add').bind("click",function(){
		$(this).prev().val($(this).prev().val()-0+1);
	});
	
	$('.order_submit').bind("click",function(){
		//check
		//submit
		parent.order_get(
				$(this).attr("product_id"),
				$(this).attr("product_name"),
				$(this).attr("product_model"),
				$(this).attr("promotion_price"),
				$(this).attr("sale_price"),
				$(this).attr("save_url"),
				$(this).next().find("input").val()
				);
		//close
		parent.$.fn.colorbox.close();
	});
	
	$(document).ready(function(){
		$("#ul_${hf.map.type1_id}").css("display","block");
		$("#ul_${hf.map.type1_id}").attr("open","true");
		//cboxTopCenter cboxContent cboxBottomCenter cboxLoadedContent
	});
	
	//打开弹出框后
	function showAdv(){
		$("#main").css("display","none");
		$("#colorbox").css("display","none");
	}
	
	//关闭弹出框后
	function closeAdv(){
		$("#main").css("display","block");
	}
	
	function addAmount(obj){
		$(obj).prev().val($(obj).pre().val()-0+1);
	}
	
	function reduceAmount(obj){
		$(obj).next().val($(obj).next().val()-0+1);
	}
 </script>
</body>
</html>
